package com.javase.A03;

import java.util.Scanner;

public class main {
    public static void main(String[] args) {
        Person person = new Person();

        Scanner scanner = new Scanner(System.in);
        while (true){
            System.out.println("请输入功能：1.自我介绍 2.吃饭 3.睡觉 4.喝水 5.退出");
            int op=scanner.nextInt();
            switch (op){
                case 1:
                    System.out.println("姓名："+person.name+" 性别："+person.sex+" 年龄："+person.age);
                    break;
                case 2:
                    person.eat();
                    break;
                case 3:
                    person.sleep();
                    break;
                case 4:
                    person.drink();
                    break;
                case 5:
                    System.out.println("退出完成！");
                    return;
            }
        }

    }
}
